package com.training.java.core.collections.car.post15;

import java.util.ArrayList;
import java.util.List;

import com.training.java.core.collections.car.pre15.Television;

public class TVArrayListDemo {

	public static void main(String[] args) {
		Television tv1 = new Television("Samsung", "LCD", true);
		Television tv2 = new Television("LG", "LED", false);
		// Television tv3= new Television("Sony","plasma",true);
		Television tv3 = new Television("Samsung", "LCD", false);

		tv1.setPrice(200);
		tv2.setPrice(300);
		tv3.setPrice(200);

		List<Television> listOfTV = new ArrayList<>();
		listOfTV.add(tv1);
		listOfTV.add(tv2);
		listOfTV.add(tv3);

		for (Television tv : listOfTV) {
			System.out.println("Company: " + tv.getCompany());
			System.out.println("type: " + tv.getType());
			System.out.println("3d Enabled: " + tv.isThreeDEnabled());
			System.out.println("price: " + tv.getPrice());
			System.out.println("**********************");
		}

		System.out.println("Are Tv1 and tv3 Equal?:" + tv1.equals(tv3));
		System.out.println("comparing tv1 and tv3: " + tv1.compareTo(tv3));
	}

}
